package org.example.aienglishapp.mapper.speech.dialoguebook;

import org.example.aienglishapp.entity.speech.dialoguebook.DialogueBook;
import org.apache.ibatis.annotations.*;

import java.sql.Blob;
import java.util.List;

/**
 * @author Asus
 */
@Mapper
public interface DialogueBookMapper {

    DialogueBook findById(Long bookId);

    List<DialogueBook> findAll();

    int insert(DialogueBook dialogueBook);

    int update(DialogueBook dialogueBook);

    int deleteById(Long bookId);

    // 获取书籍的图片
    @Select("SELECT picture FROM dialoguebook WHERE book_id = #{bookId}")
    Blob getPictureById(@Param("bookId") Long bookId);

}